﻿using System.ComponentModel.Composition;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.Utilities;

namespace Sentio.CodeReview.Editor
{
    [Export(typeof(IWpfTextViewMarginProvider))]
    [Name(CodeReviewControlBar.MarginName)]
    [Order(After=PredefinedMarginNames.Top)]
    [MarginContainer(PredefinedMarginNames.Top)]
    [ContentType("text")]
    [TextViewRole(PredefinedTextViewRoles.Document)]
    internal sealed class CodeReviewControlBar : IWpfTextViewMarginProvider
    {
        public const string MarginName = "CodeReviewControlBar";

        public IWpfTextViewMargin CreateMargin(IWpfTextViewHost wpfTextViewHost, IWpfTextViewMargin marginContainer)
        {
            return new CodeReviewControlMargin(wpfTextViewHost);
        }
    }
}
